import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/store_detail_entity.dart';

StoreDetailEntity $StoreDetailEntityFromJson(Map<String, dynamic> json) {
	final StoreDetailEntity storeDetailEntity = StoreDetailEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		storeDetailEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		storeDetailEntity.msg = msg;
	}
	final StoreDetailData? data = jsonConvert.convert<StoreDetailData>(json['data']);
	if (data != null) {
		storeDetailEntity.data = data;
	}
	return storeDetailEntity;
}

Map<String, dynamic> $StoreDetailEntityToJson(StoreDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

StoreDetailData $StoreDetailDataFromJson(Map<String, dynamic> json) {
	final StoreDetailData storeDetailData = StoreDetailData();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		storeDetailData.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		storeDetailData.name = name;
	}
	final String? logo = jsonConvert.convert<String>(json['logo']);
	if (logo != null) {
		storeDetailData.logo = logo;
	}
	final String? star = jsonConvert.convert<String>(json['star']);
	if (star != null) {
		storeDetailData.star = star;
	}
	final String? saveNum = jsonConvert.convert<String>(json['save_num']);
	if (saveNum != null) {
		storeDetailData.saveNum = saveNum;
	}
	final List<String>? banner = jsonConvert.convertListNotNull<String>(json['banner']);
	if (banner != null) {
		storeDetailData.banner = banner;
	}
	final String? isSave = jsonConvert.convert<String>(json['is_save']);
	if (isSave != null) {
		storeDetailData.isSave = isSave;
	}
	return storeDetailData;
}

Map<String, dynamic> $StoreDetailDataToJson(StoreDetailData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['logo'] = entity.logo;
	data['star'] = entity.star;
	data['save_num'] = entity.saveNum;
	data['banner'] =  entity.banner;
	data['is_save'] = entity.isSave;
	return data;
}